package com.jjy.service.impl;

import com.jjy.dao.GoodsDao;
import com.jjy.pojo.Goods;
import com.jjy.service.GoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("goodsService")
public class GoodsServiceImpl implements GoodsService{
  @Resource
  private GoodsDao goodsDao;

  @Override
  public Goods getGoodsById(Long goodsId) {
    return goodsDao.getGoodsById(goodsId);
  }

  @Override
  public Goods getGoodsByNo(Long number) {
    return goodsDao.getGoodsByNo(number);
  }

  @Override
  public int createGoods(Goods goods) {
    return goodsDao.createGoods(goods);
  }

  @Override
  public List<Goods> getGoodsByParams(Goods goods) {
    return goodsDao.getGoodsByParams(goods);
  }

  @Override
  public List<Goods> getAllGoods() {
    return goodsDao.getAllGoods();
  }
}
